.class public Les/qd;
.super Les/od;
.source "SubtitleRender.java"


# instance fields
.field private d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

.field private e:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;"
        }
    .end annotation
.end field

.field private f:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;"
        }
    .end annotation
.end field

.field private g:[I

.field private h:Z

.field private i:J


# direct methods
.method public constructor <init>(Lcom/esfile/screen/recorder/videos/edit/player/c;)V
    .locals 1

    .line 1
    invoke-direct {p0, p1}, Les/od;-><init>(Lcom/esfile/screen/recorder/videos/edit/player/c;)V

    const/4 p1, 0x2

    new-array p1, p1, [I

    .line 2
    iput-object p1, p0, Les/qd;->g:[I

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Les/qd;->h:Z

    .line 4
    iget-object p1, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    new-instance v0, Les/jd;

    invoke-direct {v0, p0}, Les/jd;-><init>(Les/qd;)V

    invoke-virtual {p1, v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->a(Lcom/esfile/screen/recorder/player/exo/DuExoGLVideoView$g;)V

    .line 5
    iget-object p1, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    new-instance v0, Les/id;

    invoke-direct {v0, p0}, Les/id;-><init>(Les/qd;)V

    invoke-virtual {p1, v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->a(Lcom/esfile/screen/recorder/player/exo/a$h;)V

    return-void
.end method

.method static synthetic a(Les/qd;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Les/qd;->e:Ljava/util/List;

    return-object p0
.end method

.method private a(ILjava/util/List;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;)V"
        }
    .end annotation

    .line 21
    iget-object v0, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    if-eqz v0, :cond_3

    .line 22
    iget-boolean v0, p0, Les/qd;->h:Z

    const-string v1, "SubtitleRender"

    if-nez v0, :cond_0

    const-string p1, "draw subtitle before player rendered."

    .line 23
    invoke-static {v1, p1}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 24
    :cond_0
    iget-object v0, p0, Les/qd;->g:[I

    const/4 v2, 0x0

    aget v2, v0, v2

    if-eqz v2, :cond_2

    const/4 v2, 0x1

    aget v0, v0, v2

    if-nez v0, :cond_1

    goto :goto_0

    .line 25
    :cond_1
    invoke-direct {p0, p1, p2}, Les/qd;->b(ILjava/util/List;)Ljava/util/List;

    move-result-object p1

    iput-object p1, p0, Les/qd;->f:Ljava/util/List;

    .line 26
    iget-object p2, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    invoke-virtual {p2, p1}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->a(Ljava/util/List;)V

    goto :goto_1

    :cond_2
    :goto_0
    const-string p1, "failed to get video view size."

    .line 27
    invoke-static {v1, p1}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    :cond_3
    :goto_1
    return-void
.end method

.method static synthetic a(Les/qd;ILjava/util/List;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1, p2}, Les/qd;->a(ILjava/util/List;)V

    return-void
.end method

.method private b(ILjava/util/List;)Ljava/util/List;
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;)",
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;"
        }
    .end annotation

    const/4 v0, 0x0

    if-nez p2, :cond_0

    return-object v0

    .line 1
    :cond_0
    invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p2

    :cond_1
    :goto_0
    invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/cd$r;

    int-to-long v2, p1

    .line 2
    iget-wide v4, v1, Les/cd$r;->i:J

    cmp-long v6, v2, v4

    if-ltz v6, :cond_1

    iget-wide v4, v1, Les/cd$r;->j:J

    cmp-long v6, v2, v4

    if-gtz v6, :cond_1

    if-nez v0, :cond_2

    .line 3
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 4
    :cond_2
    iget-object v2, p0, Les/od;->b:Les/cd;

    if-eqz v2, :cond_1

    .line 5
    iget-wide v3, v1, Les/cd$r;->i:J

    iget-wide v5, p0, Les/qd;->i:J

    invoke-static {v2, v3, v4, v5, v6}, Lcom/esfile/screen/recorder/videos/edit/activities/trim/a;->a(Les/cd;JJ)J

    move-result-wide v2

    .line 6
    iget-object v4, p0, Les/od;->b:Les/cd;

    iget-wide v5, v1, Les/cd$r;->j:J

    iget-wide v7, p0, Les/qd;->i:J

    invoke-static {v4, v5, v6, v7, v8}, Lcom/esfile/screen/recorder/videos/edit/activities/trim/a;->a(Les/cd;JJ)J

    move-result-wide v4

    sub-long/2addr v4, v2

    const-wide/16 v2, 0x3e8

    cmp-long v6, v4, v2

    if-gez v6, :cond_3

    goto :goto_0

    .line 7
    :cond_3
    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_4
    return-object v0
.end method


# virtual methods
.method protected a()V
    .locals 2

    .line 28
    invoke-super {p0}, Les/od;->a()V

    const/4 v0, 0x0

    .line 29
    iput-boolean v0, p0, Les/qd;->h:Z

    .line 30
    iget-object v0, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    if-eqz v0, :cond_0

    .line 31
    iget-object v1, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v1, v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->b(Landroid/view/View;)V

    const/4 v0, 0x0

    .line 32
    iput-object v0, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    :cond_0
    return-void
.end method

.method public synthetic a(II)V
    .locals 2

    .line 3
    iget-object v0, p0, Les/qd;->g:[I

    const/4 v1, 0x0

    aput p1, v0, v1

    const/4 p1, 0x1

    .line 4
    aput p2, v0, p1

    return-void
.end method

.method protected a(Les/cd;)V
    .locals 2

    .line 5
    iget-boolean v0, p0, Les/od;->c:Z

    if-nez v0, :cond_0

    return-void

    .line 6
    :cond_0
    iget-object v0, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->getDuration()I

    move-result v0

    int-to-long v0, v0

    .line 7
    invoke-static {p1, v0, v1}, Lcom/esfile/screen/recorder/videos/edit/activities/trim/a;->a(Les/cd;J)J

    move-result-wide v0

    iput-wide v0, p0, Les/qd;->i:J

    .line 8
    iget-object v0, p0, Les/qd;->f:Ljava/util/List;

    if-eqz v0, :cond_1

    .line 9
    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 10
    :cond_1
    iget-object p1, p1, Les/cd;->e:Les/cd$q;

    if-eqz p1, :cond_4

    .line 11
    iget-object p1, p1, Les/cd$q;->a:Ljava/util/List;

    if-nez p1, :cond_2

    goto :goto_0

    .line 12
    :cond_2
    iput-object p1, p0, Les/qd;->e:Ljava/util/List;

    .line 13
    iget-object p1, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    if-nez p1, :cond_3

    .line 14
    new-instance p1, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    iget-object v0, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p1, v0}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    .line 15
    iget-object v0, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v0, p1}, Lcom/esfile/screen/recorder/videos/edit/player/c;->a(Landroid/view/View;)V

    .line 16
    :cond_3
    iget-object p1, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    new-instance v0, Les/qd$a;

    invoke-direct {v0, p0}, Les/qd$a;-><init>(Les/qd;)V

    invoke-virtual {p1, v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->a(Lcom/esfile/screen/recorder/videos/edit/player/c$r;)V

    .line 17
    iget-object p1, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/edit/player/c;->getCurrentPosition()I

    move-result p1

    iget-object v0, p0, Les/qd;->e:Ljava/util/List;

    invoke-direct {p0, p1, v0}, Les/qd;->a(ILjava/util/List;)V

    goto :goto_1

    .line 18
    :cond_4
    :goto_0
    iget-object p1, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    if-eqz p1, :cond_5

    .line 19
    iget-object v0, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v0, p1}, Lcom/esfile/screen/recorder/videos/edit/player/c;->b(Landroid/view/View;)V

    const/4 p1, 0x0

    .line 20
    iput-object p1, p0, Les/qd;->d:Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;

    :cond_5
    :goto_1
    return-void
.end method

.method public synthetic c()V
    .locals 2

    .line 1
    iget-boolean v0, p0, Les/qd;->h:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    .line 2
    iput-boolean v0, p0, Les/qd;->h:Z

    .line 3
    iget-object v0, p0, Les/od;->a:Lcom/esfile/screen/recorder/videos/edit/player/c;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/videos/edit/player/c;->getCurrentPosition()I

    move-result v0

    iget-object v1, p0, Les/qd;->e:Ljava/util/List;

    invoke-direct {p0, v0, v1}, Les/qd;->a(ILjava/util/List;)V

    :cond_0
    return-void
.end method
